package com.cssl.domain;

import cn.hutool.core.util.DesensitizedUtil;
import com.cssl.annotation.Sensitive;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
@ApiModel("用户实体类")
public class DtsUser implements Serializable {
    Integer id;
    String userName;
    String password;
    /**
     * 性别
     */
    Integer gender;
    /**
     * 生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date birthday;
    /**
     * 最后一次登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date lastLoginTime;
    /**
     * 最后一次登录IP
     */
    String lastLoginIp;
    /**
     * 用户层级
     */
    Integer userLevel;
    /**
     * 用户昵称
     */
    String nickName;
    /**
     * 手机号
     */
    @Sensitive(DesensitizedUtil.DesensitizedType.MOBILE_PHONE)
    String mobile;
    /**
     * 头像图片
     */
    String avatar;
    /**
     * 微信登录Id
     */
    String weiXinOpenId;
    /**
     * 状态
     * 0 可用
     * 1 禁用
     * 2 注销
     */
    Integer status;
    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date addTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")

    Date updateTime;
    /**
     * 是否删除
     * 0 未删除
     * 1 删除
     */
    Integer deleted;
    /**
     * 分享Id
     */
    Integer shareUserId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getGender() {
        return gender;
    }
    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }
    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }


    public Integer getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(Integer userLevel) {

        this.userLevel = userLevel;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getWeiXinOpenId() {
        return weiXinOpenId;
    }

    public void setWeiXinOpenId(String weiXinOpenId) {
        this.weiXinOpenId = weiXinOpenId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getShareUserId() {
        return shareUserId;
    }

    public void setShareUserId(Integer shareUserId) {
        this.shareUserId = shareUserId;
    }

    public DtsUser() {
    }


    public DtsUser(Integer id, String userName, String password, Integer gender, Date birthday, Date lastLoginTime, String lastLoginIp, Integer userLevel, String nickName, String mobile, String avatar, String weiXinOpenId, Integer status, Date addTime, Date updateTime, Integer deleted, Integer shareUserId) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.gender = gender;
        this.birthday = birthday;
        this.lastLoginTime = lastLoginTime;
        this.lastLoginIp = lastLoginIp;
        this.userLevel = userLevel;
        this.nickName = nickName;
        this.mobile = mobile;
        this.avatar = avatar;
        this.weiXinOpenId = weiXinOpenId;
        this.status = status;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.deleted = deleted;
        this.shareUserId = shareUserId;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }


}
